﻿CREATE TABLE [dbo].[Patients] (
    [patientID]                         BIGINT          IDENTITY (1, 1) NOT NULL,
    [patientEntID]                      SMALLINT        NOT NULL,
    [patientLocationID]                 INT             NULL,
    [patientMemberDate]                 DATE            NULL,
    [patientFirstName]                  NVARCHAR (300)  NOT NULL,
    [patientLastName]                   NVARCHAR (300)  NOT NULL,
    [patientEmailList]                  BIT             NOT NULL,
    [patientEmailAddress]               NVARCHAR (300)  NULL,
    [patientCreateDate]                 DATETIME        NOT NULL,
    [patientPrescriptionNumber]         NVARCHAR (50)   NULL,
    [patientPrescriptionStatus]         SMALLINT        NULL,
    [patientDatePrescriptionExpiration] DATETIME        NULL,
    [patientAddress]                    NVARCHAR (300)  NULL,
    [patientAddress2]                   NVARCHAR (300)  NULL,
    [patientCity]                       NVARCHAR (100)  NULL,
    [patientState]                      NVARCHAR (2)    NULL,
    [patientZip]                        NVARCHAR (9)    NULL,
    [patientAddressLat]                 NUMERIC (10, 6) NULL,
    [patientAddressLong]                NUMERIC (10, 6) NULL,
    [patientPhoneCell]                  NVARCHAR (50)   NULL,
    [patientPhoneHome]                  NVARCHAR (50)   NULL,
    [patientPhoneOther]                 NVARCHAR (50)   NULL,
    [patientAllowSMS]                   BIT             NULL,
    [patientAllowSurvey]                BIT             NOT NULL,
    [patientDatePhd]                    DATETIME        NULL,
    [patientDateBirth]                  DATETIME        NULL,
    [patientDriversLicenseNumber]       NVARCHAR (50)   NULL,
    [patientDriversLicenseString]       NVARCHAR (500)  NULL,
    [patientDriversLicenseState]        NVARCHAR (2)    NULL,
    [patientDoctorID]                   INT             NULL,
    [isMember]                          BIT             NOT NULL,
    [patientMemberLocation]             INT             NULL,
    [doNotContact]                      BIT             NOT NULL,
    [lastUpdateDate]                    DATETIME        NOT NULL,
    [lastUserID]                        INT             NULL
);







